<div class="ch-container" (keyup.enter)="login()">
    <div class="row">
        <div class="col-md-12 center login-header">
            <h2>欢迎使用HK-BASE</h2>
        </div>
    </div>
    <div class="row" #box>
        <div class="well col-md-5 center login-box">
            <div *ngIf="!errorMsg" class="alert alert-info">
                请输入用户名和密码
            </div>
            <div *ngIf="errorMsg" class="alert alert-danger">
                {{errorMsg}}
            </div>
            <form class="form-horizontal">
                <fieldset>
                    <div class="input-group input-group-lg">
                        <span class="input-group-addon"><i class="glyphicon glyphicon-user red"></i></span>
                        <input class="form-control" #nameModel="ngModel" name="userName" [(ngModel)]="userName" placeholder="手机号码" type="text" required>
                    </div>
                    <div class="clearfix"></div><br>

                    <div class="input-group input-group-lg">
                        <span class="input-group-addon"><i class="glyphicon glyphicon-lock red"></i></span>
                        <input class="form-control" #pwdModel="ngModel" name="password" [(ngModel)]="password" placeholder="密码" type="password" required>
                    </div>
                    <div class="clearfix"></div>

                    <a (click)="login()">
                        <p class="center col-md-5">
                            <button type="button" class="btn btn-primary" [ngClass]="{'disabled': nameModel.invalid || pwdModel.invalid}">登录</button>
                        </p>
                    </a>
                </fieldset>
            </form>
        </div>
    </div>
</div>